#pragma once
#include <string>
#include <mutex>

namespace Image2D
{
    class LastError
    {
    private:
        static std::string m_lastErrorStr;
        static int m_lastErrorCode;

        static std::mutex m_mutex;

    public:
        static int getLastErrorCode();
        static std::string getLastErrorStr();

        static void setLastError(std::string errorStr, int errorCode = 0);
    };
}